<my-pageheader></my-pageheader>

<mat-card style="margin: 20px 20px 50px 20px">
    <h2 align="center">物体识别</h2>
    <br><br>

    <div class="row">
        <div class="col-md-2">
        </div>
        <div class="col-md-5">
            <div>
                <input type="file" ng2FileSelect [uploader]="fileSelector" accept=".jpg, .jpeg, .png, .gif" [disabled]="sending" />
            </div>
            <br>
            <div>
                <img style="max-width: 100%" src="{{selectedImgDataUrl}}"  width="300" alt="">
            </div>
            <p>（请输入1：1比例彩色图）</p>
        </div>
        <div class="col-md-5">
            <br><br>
            <span *ngIf="result && result.length === 1">
                识别结果：
            </span>
            <span style="font-size: 36px" >
                &nbsp;&nbsp;&nbsp;&nbsp;{{resultNum}}
            </span>
            <span *ngIf="resultNum && result.length !== 1">
                出错啦：&nbsp;&nbsp;&nbsp;&nbsp;{{resultNum}}
            </span>
        </div>
    </div>
</mat-card>
